package com.shengqin.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.shengqin.pojo.plan.FreeTestPrjNameModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 成绩
 * </p>
 *
 * @author Rui.Zhou
 * @since 2023-12-11
 */
@TableName("t_plan_student")
@Data
public class PlanStudent implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "所属年级")
    private Integer gradeId;

    @Schema(description = "班级名称")
    private String classesName;

    @Schema(description = "班级名称")
    private String classesCode;

    @Schema(description = "学籍号")
    private String studyCode;

    @Schema(description = "姓名")
    private String name;

    @Schema(description = "性别")
    private String sex;

    @Schema(description = "身份证号")
    private String idNumber;

    @Schema(description = "民族")
    private String nation;

    @Schema(description = "生日")
    private LocalDate birthday;

    @Schema(description = "学生来源")
    private String fromSource;

    @Schema(description = "家庭地址")
    private String address;

    @Schema(description = "头像")
    private String avatarUrl;

    @Schema(description = "IC卡号")
    private String cardNo;

    @Schema(description = "录入时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "测试计划ID")
    private Integer planId;

    @Schema(description = "学年")
    private String schoolYear;

    @Schema(description = "所属学校")
    private Integer schoolId;

    private Boolean freeTestFlag;
    private String freeTestReason;
    private String collegeName;
    @Version
    private Integer version;

    @TableField(exist = false)
    private String faceData;
    @TableField(exist = false)
    private String featureUrl;
    @TableField(exist = false)
    private String featureVersion;

    @ExcelProperty("项目名称")
    @TableField(exist = false)
    private String prjName;
    @TableField(exist = false)
    private String schoolName;
    @TableField(exist = false)
    private String gradeName;
    @TableField(exist = false)
    private Collection<String> testPrjNames = new ArrayList<>();
    @TableField(exist = false)
    private String qrCode;
    @TableField(exist = false)
    private String img;
    @TableField(exist = false)
    private List<FreeTestPrjNameModel> freeTestPrjNameList;
}
